<?php
require 'db_config.php';
$user=$_POST['user'];
$pwd=$_POST['pwd'];
$sql="select * from users WHERE user='$user'";
$res=mysqli_query($con,$sql);
$res=mysqli_fetch_array($res);
if (password_verify($pwd,$res['pwd'])){
    session_start();
    $_SESSION['user']=$user;
    echo 'success';
}else{
    echo 'error';
}